package com.qf.function.controller;

import com.qf.pojo.User;

import java.util.function.Consumer;
import java.util.function.Supplier;

public class UserController {
    public void proccessUser(Consumer<User> userConsumer){
        User user = new User();
        user.setName("张三");
        user.setAge(18);
        user.setAddress("二道沟");
        userConsumer.accept(user);
    }
    public void processUser(Supplier<User> userSupplier){
        User user = userSupplier.get();
        String name = user.getName();
        System.out.println(name.toLowerCase());

    }
}
